* { margin: 0; padding: 0; box-sizing: border-box; }
  body { background: #080c10; color: #e8f0f8; font-family: 'Segoe UI', sans-serif; }

  /* NAV */
  .nav {
    background: #0d1420;
    border-bottom: 1px solid #1e2d42;
    padding: 0 32px;
    display: flex;
    align-items: center;
    gap: 0;
    position: sticky;
    top: 0;
    z-index: 100;
  }
  .nav-brand {
    font-size: 20px;
    font-weight: 800;
    color: #00e5a0;
    padding: 16px 24px 16px 0;
    border-right: 1px solid #1e2d42;
    margin-right: 8px;
  }
  .nav-tab {
    padding: 18px 20px;
    font-size: 13px;
    color: #5a7a99;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
  }
  .nav-tab:hover { color: #e8f0f8; }
  .nav-tab.active { color: #00e5a0; border-bottom-color: #00e5a0; }

  /* PAGES */
  .page { display: none; max-width: 900px; margin: 0 auto; padding: 32px 24px; }
  .page.active { display: block; }

  /* CARDS */
  .card {
    background: #0d1420;
    border: 1px solid #1e2d42;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
  }
  .card h2 { font-size: 17px; color: #00e5a0; margin-bottom: 18px; }
  .card h3 { font-size: 14px; color: #5a7a99; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 12px; }

  /* FORM ELEMENTS */
  .form-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin-bottom: 16px; }
  .form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
  .form-group label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: #5a7a99; margin-bottom: 6px; }
  .form-group input, .form-group select {
    width: 100%; background: #111a28; border: 1px solid #1e2d42;
    border-radius: 8px; padding: 10px 14px; color: #e8f0f8;
    font-size: 13px; outline: none;
  }
  .form-group input:focus, .form-group select:focus { border-color: #00e5a0; }
  .form-group input::placeholder { color: #3a5a72; }

  /* BUTTONS */
  .btn { padding: 12px 20px; border: none; border-radius: 8px; font-size: 13px; font-weight: 700; cursor: pointer; transition: opacity 0.2s; }
  .btn:disabled { opacity: 0.4; cursor: not-allowed; }
  .btn-primary { background: #00e5a0; color: #080c10; width: 100%; padding: 14px; font-size: 15px; border-radius: 10px; }
  .btn-primary:hover:not(:disabled) { opacity: 0.85; }
  .btn-secondary { background: #0077ff; color: white; }
  .btn-secondary:hover:not(:disabled) { opacity: 0.85; }
  .btn-sm { padding: 7px 14px; font-size: 12px; }

  /* UPLOAD */
  .upload-area {
    border: 2px dashed #1e2d42;
    border-radius: 10px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s;
    margin-bottom: 16px;
  }
  .upload-area:hover { border-color: #00e5a0; }
  .upload-area p { color: #5a7a99; font-size: 13px; margin-top: 8px; }
  .upload-area input { display: none; }

  /* LOADING */
  .loading { display: none; text-align: center; padding: 32px; }
  .loading.show { display: block; }
  .spinner { width: 36px; height: 36px; border: 3px solid #1e2d42; border-top-color: #00e5a0; border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 14px; }
  @keyframes spin { to { transform: rotate(360deg); } }
  .loading p { color: #5a7a99; font-size: 13px; }

  /* RESULT COMPONENTS */
  .risk-box { border-radius: 14px; padding: 24px; margin-bottom: 16px; display: flex; align-items: center; gap: 20px; border: 1px solid; }
  .risk-box.green { background: rgba(0,229,160,0.06); border-color: rgba(0,229,160,0.3); }
  .risk-box.yellow { background: rgba(255,193,7,0.06); border-color: rgba(255,193,7,0.3); }
  .risk-box.orange { background: rgba(255,107,53,0.06); border-color: rgba(255,107,53,0.3); }
  .risk-box.red { background: rgba(220,53,69,0.06); border-color: rgba(220,53,69,0.3); }

  .score-circle { width: 80px; height: 80px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; border: 3px solid; }
  .score-circle.green { border-color: #00e5a0; }
  .score-circle.yellow { border-color: #ffc107; }
  .score-circle.orange { border-color: #ff6b35; }
  .score-circle.red { border-color: #dc3545; }
  .score-num { font-size: 26px; font-weight: 800; line-height: 1; }
  .score-circle.green .score-num { color: #00e5a0; }
  .score-circle.yellow .score-num { color: #ffc107; }
  .score-circle.orange .score-num { color: #ff6b35; }
  .score-circle.red .score-num { color: #dc3545; }
  .score-label { font-size: 9px; color: #5a7a99; }

  .badge { display: inline-block; padding: 3px 10px; border-radius: 100px; font-size: 11px; font-weight: 600; margin-bottom: 6px; }
  .badge.green { background: rgba(0,229,160,0.1); color: #00e5a0; }
  .badge.yellow { background: rgba(255,193,7,0.1); color: #ffc107; }
  .badge.orange { background: rgba(255,107,53,0.1); color: #ff6b35; }
  .badge.red { background: rgba(220,53,69,0.1); color: #dc3545; }
  .badge.blue { background: rgba(0,119,255,0.1); color: #0077ff; }

  .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
  .info-card { background: #111a28; border: 1px solid #1e2d42; border-radius: 10px; padding: 16px; }
  .info-card h4 { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: #5a7a99; margin-bottom: 10px; }
  .info-card p, .info-card li { font-size: 12px; color: #8fafc7; line-height: 1.7; }
  .info-card ul { padding-left: 14px; }
  .info-card li { margin-bottom: 3px; }

  .text-box { background: #111a28; border: 1px solid #1e2d42; border-radius: 10px; padding: 16px; margin-bottom: 14px; }
  .text-box h4 { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: #5a7a99; margin-bottom: 10px; }
  .text-box p { font-size: 12px; color: #8fafc7; line-height: 1.8; white-space: pre-wrap; }

  /* BUYER CARDS */
  .buyer-card { background: #111a28; border: 1px solid #1e2d42; border-radius: 10px; padding: 16px; margin-bottom: 10px; }
  .buyer-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
  .buyer-name { font-size: 15px; font-weight: 700; }
  .buyer-meta { font-size: 11px; color: #5a7a99; margin-bottom: 8px; }
  .buyer-fit { font-size: 12px; color: #8fafc7; margin-bottom: 10px; }

  /* EMAIL BOX */
  .email-box { background: #111a28; border: 1px solid #1e2d42; border-radius: 10px; padding: 16px; margin-top: 10px; }
  .email-subject { font-size: 13px; font-weight: 700; color: #00e5a0; margin-bottom: 8px; }
  .email-body { font-size: 12px; color: #8fafc7; line-height: 1.8; white-space: pre-wrap; }

  /* DASHBOARD */
  .stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
  .stat-card { background: #111a28; border: 1px solid #1e2d42; border-radius: 10px; padding: 16px; text-align: center; }
  .stat-num { font-size: 32px; font-weight: 800; color: #00e5a0; }
  .stat-label { font-size: 11px; color: #5a7a99; text-transform: uppercase; letter-spacing: 0.1em; margin-top: 4px; }

  .briefing-box { background: #111a28; border: 1px solid rgba(0,229,160,0.2); border-radius: 10px; padding: 20px; }
  .briefing-box h4 { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: #00e5a0; margin-bottom: 12px; }
  .briefing-box p { font-size: 13px; color: #8fafc7; line-height: 1.9; white-space: pre-wrap; }

  .result-area { display: none; }
  .result-area.show { display: block; }

  /* FILE NAME display */
  .file-name { font-size: 12px; color: #00e5a0; margin-top: 8px; }

/* ── MarketPulse Styles ── */
.mp-form-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:14px; margin-bottom:18px; }
.mp-form-group { display:flex; flex-direction:column; gap:5px; }
.mp-form-group label { font-size:12px; opacity:0.65; }
.mp-form-group input, .mp-form-group select { padding:9px 12px; border-radius:8px; border:1px solid rgba(255,255,255,0.15); background:rgba(255,255,255,0.07); color:inherit; font-size:14px; }
.mp-hero { display:flex; align-items:center; gap:20px; margin:14px 0; padding:18px; background:rgba(255,255,255,0.05); border-radius:10px; }
.mp-direction { font-size:42px; font-weight:900; min-width:80px; text-align:center; }
.mp-direction.UP { color:#22c55e; } .mp-direction.DOWN { color:#ef4444; } .mp-direction.STABLE { color:#f59e0b; }
.mp-meta { display:flex; flex-direction:column; gap:7px; font-size:14px; }
.mp-detail-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:12px; margin-top:14px; }
.mp-detail-box { background:rgba(255,255,255,0.05); border-radius:10px; padding:14px; }
.mp-detail-box h4 { margin:0 0 8px; font-size:13px; opacity:0.75; }
.mp-detail-box ul { margin:0; padding-left:16px; } .mp-detail-box li { margin-bottom:5px; font-size:13px; }
.mp-stats-row { display:flex; gap:14px; flex-wrap:wrap; margin:14px 0; }
.mp-stat { background:rgba(255,255,255,0.05); border-radius:10px; padding:12px 18px; display:flex; flex-direction:column; gap:4px; min-width:140px; }
.mp-stat-label { font-size:11px; opacity:0.6; }
.mp-stat-val { font-size:17px; font-weight:700; color:#60a5fa; }
.mp-trends-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:10px; margin-top:14px; }
.mp-trend-item { background:rgba(255,255,255,0.05); border-radius:9px; padding:12px; }
.mp-trend-item .mt-name { font-weight:700; font-size:13px; }
.mp-trend-item .mt-impact { font-size:11px; margin:3px 0; }
.mp-trend-item .mt-impact.HIGH { color:#ef4444; } .mp-trend-item .mt-impact.MEDIUM { color:#f59e0b; } .mp-trend-item .mt-impact.LOW { color:#22c55e; }
.mp-trend-item .mt-desc { font-size:12px; opacity:0.8; }
.mp-verdict-box { text-align:center; padding:18px; border-radius:10px; background:rgba(255,255,255,0.05); margin:14px 0; font-size:20px; font-weight:900; }
.mp-verdict-box .ADAPT_OR_DIE { color:#ef4444; } .mp-verdict-box .GREAT_OPPORTUNITY { color:#22c55e; } .mp-verdict-box .STABLE_EVOLUTION { color:#60a5fa; }
.mega-item { background:rgba(255,255,255,0.05); border-radius:10px; padding:14px; border-left:4px solid #6366f1; }
.mega-item .mg-name { font-weight:700; font-size:14px; }
.mega-item .mg-prob { font-size:12px; opacity:0.7; margin:3px 0; }
.mega-item .mg-desc { font-size:13px; margin:5px 0; }
.mega-item .mg-action { font-size:12px; color:#22c55e; font-style:italic; }

/* ── Cyber Risk ── */
.cr-score-wrap { background:rgba(255,255,255,0.05); border-radius:10px; padding:16px; margin:14px 0; }
.cr-score-track { background:rgba(255,255,255,0.1); border-radius:99px; height:14px; margin:8px 0; overflow:hidden; }
.cr-score-bar { height:100%; border-radius:99px; transition:width 0.8s ease; }
.cr-badge { display:inline-block; padding:4px 14px; border-radius:99px; font-weight:700; font-size:13px; }
.cr-low { background:#22c55e22; color:#22c55e; } .cr-moderate { background:#f59e0b22; color:#f59e0b; }
.cr-high { background:#ef444422; color:#ef4444; } .cr-critical { background:#ef444444; color:#ef4444; }
.cr-osint-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:10px; margin-top:14px; }
.cr-osint-item { background:rgba(255,255,255,0.05); border-radius:9px; padding:12px; }
.cr-osint-item .co-label { font-size:11px; opacity:0.6; margin-bottom:4px; }
.cr-osint-item .co-value { font-size:13px; font-weight:600; }

/* ── Micro-Econ ── */
.me-supplier-item { display:flex; justify-content:space-between; align-items:center; background:rgba(255,255,255,0.05); border-radius:8px; padding:10px 14px; margin-bottom:8px; font-size:13px; }
.me-input-row { display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); gap:10px; margin-bottom:12px; }
.me-stat-row { display:flex; gap:12px; flex-wrap:wrap; margin:14px 0; }
.me-stat { background:rgba(255,255,255,0.05); border-radius:9px; padding:12px 16px; min-width:130px; }
.me-stat .ms-label { font-size:11px; opacity:0.6; }
.me-stat .ms-value { font-size:18px; font-weight:700; color:#60a5fa; margin-top:2px; }
.me-action-box { background:rgba(99,102,241,0.15); border:1px solid #6366f1; border-radius:10px; padding:16px; margin:14px 0; }
.me-ranked-table { width:100%; border-collapse:collapse; margin-top:12px; font-size:13px; }
.me-ranked-table th { text-align:left; padding:8px 10px; background:rgba(255,255,255,0.07); opacity:0.7; font-size:12px; }
.me-ranked-table td { padding:8px 10px; border-bottom:1px solid rgba(255,255,255,0.06); }
.me-ranked-table tr:first-child td { color:#22c55e; font-weight:600; }

/* ── Audit Trail ── */
.at-stats-row { display:flex; gap:12px; flex-wrap:wrap; margin:14px 0; }
.at-stat { background:rgba(255,255,255,0.05); border-radius:9px; padding:12px 18px; min-width:120px; }
.at-stat .as-label { font-size:11px; opacity:0.6; }
.at-stat .as-value { font-size:22px; font-weight:800; margin-top:2px; }
.at-supplier-row { background:rgba(255,255,255,0.04); border-radius:9px; padding:12px 14px; margin-bottom:8px; }
.at-sup-name { font-weight:700; font-size:14px; margin-bottom:6px; }
.at-sup-badges { display:flex; gap:8px; flex-wrap:wrap; }
.at-badge { font-size:12px; font-weight:600; padding:3px 10px; border-radius:99px; color:white; }